/**
 * @param 景点模块
 */
import request from "@/utils/request";
// 切换路由页面无法实时切换，导致还是走之前的URL 1.路由守卫刷新  2.直接使用统一baseurl管理
import baseUrl from "@/utils/requestBase";

export function addInsert(data) {
  return request({
    url: "/insert",
    method: "post",
    baseURL: `${baseUrl.attractions}`,
    data,
  });
}

export function selectAttractionsById(id) {
  return request({
    url: "/list",
    method: "get",
    baseURL: `${baseUrl.attractions}`,
    params:{
		scenicId:id
	}
  });
}

export function modifyAttractions(data) {
  return request({
    url: "/modify",
    method: "post",
    baseURL: `${baseUrl.attractions}`,
    data
  });
}


export function deleteAttractions(id) {
  return request({
    url: `/delete/${id}`,
    method: "DELETE",
    baseURL: `${baseUrl.attractions}`,
  });
}


export function recoverAttractions(id) {
  return request({
    url: `/recover/${id}`,
    method: "PUT",
    baseURL: `${baseUrl.attractions}`,
  });
}
